package com.example.codetest;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.yunpian.sdk.YunpianClient;
import com.yunpian.sdk.model.Result;
import com.yunpian.sdk.model.SmsSingleSend;

import java.util.Map;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        YunpianClient clnt = new YunpianClient("4090f6b3ff25430309187b131a24a445").init();
        Map<String, String> param = clnt.newParam(2);
        param.put(YunpianClient.MOBILE, "18846436143");
        param.put(YunpianClient.TEXT, "【苏鹏的个人软件】您的验证码是1234。如非本人操作，请忽略本短信");
        Result<SmsSingleSend> r = clnt.sms().single_send(param);
        clnt.close();
    }
}
